home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / newsgroups / misc.19980424-19980901 / 000047_news@newsmaster….columbia.edu _Wed May 6 10:52:28 1998.msg < prev    next >
Internet Message Format  |  1998-08-31  |  3KB

  1. Return-Path: <news@newsmaster.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id KAA15363
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Wed, 6 May 1998 10:52:27 -0400 (EDT)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id KAA27913
  7.     for kermit.misc@watsun; Wed, 6 May 1998 10:52:26 -0400 (EDT)
  8. Path: news.columbia.edu!watsun.cc.columbia.edu!jaltman
  9. From: jaltman@watsun.cc.columbia.edu (Jeffrey Altman)
  10. Newsgroups: comp.protocols.kermit.misc
  11. Subject: Re: Date Bug?
  12. Date: 6 May 1998 14:52:22 GMT
  13. Organization: Columbia University
  14. Lines: 49
  15. Message-ID: <6iptf6$t8i$1@apakabar.cc.columbia.edu>
  16. References: <6ionbf$s3g@bgtnsc01.worldnet.att.net> <6iprm7$s4s$1@apakabar.cc.columbia.edu>
  17. NNTP-Posting-Host: watsun.cc.columbia.edu
  18. Xref: news.columbia.edu comp.protocols.kermit.misc:8699
  19.  
  20. In article <6iprm7$s4s$1@apakabar.cc.columbia.edu>,
  21. Frank da Cruz <fdc@watsun.cc.columbia.edu> wrote:
  22. : In article <6ionbf$s3g@bgtnsc01.worldnet.att.net>,
  23. : Bernie  <bfb@worldnet.att.net> wrote:
  24. : : There's a 4 hour discrepancy between the date in C-Kermit
  25. : : 6.0.192 and my linux box.  Below is the date command issued
  26. : : from C-Kermit and then the command line.
  27. : : 
  28. : : How can I set these to be the same?
  29. : : 
  30. : : C-Kermit@localhost> date
  31. : : Wed May  6 03:59:03 1998
  32. : : 
  33. : : C-Kermit@localhost> qui
  34. : : /home/super/kermit> date
  35. : : Tue May  5 23:59:08 EDT 1998
  36. : : 
  37. : I've never seen this before.  C-Kermit gets the date and time
  38. : (as you might expect) by asking the operating system.  The
  39. : DATE command simply prints the string returned by the OS.
  40. : The exact method for getting the date depends on the operating
  41. : system.  In most forms of UNIX, the method is to call time(0),
  42. : which returns GMT, and then convert to a local-time string by
  43. : passing the time(0) result to ctime(), which is supposed to
  44. : return local time.
  45. : It looks like there might be some confusion about this on your
  46. : computer.  Locally (in the Eastern USA timezone), the Kermit
  47. : "date" command returns the local date and time.
  48. : If you want to look at the code, see function ztime() in
  49. : ckufio.c.
  50. : - Frank
  51.  
  52.  
  53. This might provide a bit of a clue.  Most Unix system have their 
  54. hardware clocks set to GMT instead of local time.  All of the 
  55. C runtime library time functions make this assumption.
  56.  
  57. It appears that you have your hardware clock set to local time
  58. and somehow the 'date' command knows this but the C run time functions
  59. (and therefore C-Kermit) do not.
  60.  
  61.     Jeffrey Altman * Sr.Software Designer * Kermit-95 for Win32 and OS/2
  62.                  The Kermit Project * Columbia University
  63.               612 West 115th St #716 * New York, NY * 10025
  64.   http://www.kermit-project.org/k95.html * kermit-support@kermit-project.org